package top.songxs.gmall.feign.product;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import top.songxs.gmall.common.result.Result;
import top.songxs.gmall.feign.product.fallback.SkuInfoFeignClientFallback;
import top.songxs.gmall.product.entity.SkuInfo;

import java.util.List;

@FeignClient(value = "service-product" ,fallback = SkuInfoFeignClientFallback.class)
public interface SkuInfoFeignClient {
    @GetMapping("api/inner/product/getSkuInfo/{skuId}")
    public Result<SkuInfo> getSkuInfo(@PathVariable("skuId") Long skuId);

    @GetMapping("api/inner/product/getPrice/{skuId}")
    public Result<SkuInfo> getPrice(@PathVariable("skuId") Long skuId);
    @GetMapping("api/inner/product/getAllSkuId")
    Result<List<Long>> getAllSkuId();
}
